﻿<!Doctype html>

	<!--添加PHP数据库测试代码-->
	<?php
		
		$KindNameList = array();
		
		try 
		{
		 $hostname = "192.168.16.23"; 
		 $dbname = "QPPlatformDB";
		 $username = "sa"; 
		 $pwd = "sa"; 
		 $dsn="sqlsrv:Server=$hostname;database=$dbname";
		 
		$pdo = new PDO ($dsn,$username,"sa");
		
		$rs = $pdo->query("select * from GameKindItem");
		while($row = $rs->fetch())
		{
			/*echo "KindId: "; print_r($row["KindID"]); echo $row["KindName"];*/
			/*echo "KindId: "; echo $row["KindID"];  echo "	KindName: "; echo $row["KindName"];
			echo "<br>";*/
			/*echo "<li><span>"; echo $row["KindName"]; echo "</span></li>";*/
			$KindNameList[] = $row["KindName"];
		}
		
	   } 
	   catch (PDOException $e) 
	   {
		 echo "Failed to get DB handle: " . $e->getMessage() . "\n";
		 exit;
	   }
   ?>
	<!---->
	
<html>
	<head>
		<title>php棋牌</title>
	</head>
	<body>
		<div class="top_nav"></div>
		<div class="poker">
			<div class="pr poker_con">
				<div class="nav">
					<?php echo $KindNameList[0]; ?>
				</div>
				<div class="poker_main">
					<div class="pr ad_download">
					</div>
					<div class="main_con">
					</div>
				</div>
			</div>
			<div class="footer_index">
			</div>
		</div>
	</body>
</html>



